package com.zjm.creational.builder.improve;

/**
 * 建造者模式
 */
public class Client {
    public static void main(String[] args) {
        // 普通房子
        CommonHouse commonHouse = new CommonHouse();
        // 创建房子的指挥者
        HouseDirector houseDirector = new HouseDirector(commonHouse);

        // 建造好的房子
        House house = houseDirector.constructHouse();

        System.out.println(house);

        System.out.println("--------------------");

        // 高楼大厦
        HighBuilding highBuilding = new HighBuilding();
        HouseDirector houseDirector1 = new HouseDirector(highBuilding);
        House house1 = houseDirector1.constructHouse();
        System.out.println(house1);

    }
}
